<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CoupoNow</title>
<link href="couponow.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
	background-image:url('light_blue.jpg');
	
}
</style>
<SCRIPT TYPE="text/javascript">
			function getbId()
			{
				var bId = location.href.substring((location.href.indexOf('bId=')+4), location.href.indexOf('&result'));
				
				return bId;
			}
			
			function getResult()
			{
				var bId = location.href.substring((location.href.indexOf('result=')+7), location.href.length);
				
				return bId;
			}
</script>


</head>

<body>
<div id="general">
 <div id="heading1">
 <div id="image"><a href="/"><img src="heading1.png" width="474" height="166" alt="Logo" style="border-style:none"/></a></div>
  <div id="yoursource">
    		<img src="pic1.png" height="126" width="540"/>
  		</div>
</div>
<br class="clearfloat" />
<div id="body">
<div style="height:auto; text-align:center">
<p> <table width="1000" border="0" style="background:#ececec&gt;
         &lt;tr&gt;
           &lt;td width= background-color: #333; background-color: #333; color: #FFF; font-family: Verdana, Geneva, sans-serif; font-size: 20px; font-style: normal; font-weight: bolder;"45"><div align="center"></div></td>
           <td width="49"><div align="center"></div></td>
           <td width="49"><div align="center"></div></td>
           <td width="49"><div align="center"></div></td>
           <td width="49"><div align="center"></div></td>
           <td width="49"><div align="center"></div></td>
           <td width="397"><div align="center"></div></td>
           <td width="116"><div align="center">צור קשר</div></td>
           <td width="68"><div align="center">אודות</div></td>
           <td width="136"><div align="center">הצעות פעילות</div></td>
         </tr>
         
         
       </table></div>
      

<div id="bottons">
<FORM ACTION="/validationservlet" method="post">
<INPUT TYPE="hidden" id="busid" NAME="bId" VALUE=""><P>
<input type="submit" VALUE="בדוק קופון" />
<span id="sprytextfield"><span class="textfieldRequiredMsg">.שדה חובה</span>
<span class="textfieldInvalidFormatMsg">אנא הכנס מספר</span>
<input type="text" name ="num" size="30" value=""/> </span>
</FORM>
</div>
				
<div style="height:auto; text-align:center">
<table width="1000" border="0"style="background:#ececec&gt;
         &lt;tr&gt;
           &lt;td width= background-color: #333; background-color: #333; color: #FFF; font-family: Verdana, Geneva, sans-serif; font-size: 14px;"45"><div align="center"></div><td width="0" height="2"></td>
           <td width="48" height="39"><div align="center"></div></td>
           <td width="48"><div align="center"></div></td>
           <td width="48"><div align="center"></div></td>
           <td width="389"><div align="center"></div></td>
           <td width="69"><div align="center">תקנון</div></td>
           <td width="116"><div align="center">שאלות נפוצות</div></td>
           <td width="73"><div align="center">צור קשר</div></td>
           <td width="64"><div align="center">אודות</div></td>
           <td width="103"><div align="center">הצעות פעילות</div></td>
         </tr>
     </table></p></div>

</div>
</div>
<script type="text/javascript">
var sprytextfield = new Spry.Widget.ValidationTextField("sprytextfield", "integer");
</script>


<SCRIPT TYPE="text/javascript">
		var bId = getbId();
		document.getElementById("busid").value = bId;
		var result = getResult();
		if (result == 1)
			alert("אין כרגע עסקאות פעילות");
		else if (result == 0)
			alert("Bad Number/Coupon already used");
		else
		{}
		
</script>

</body>

</html>
